<fieldset>
    <div class="widget">
        <div class="title"> <?= image_tag('icons/color/users.png', array("class" => "titleIcon")); ?><h6>Customers List</h6></div>
        <table id="DataTables_Table_0" cellpadding="0" cellspacing="0" border="0" class="display" width="100%" >
            <thead>
                <tr>
                    <th>Title </td>
                    <th>Customer Name </td>
                    <th>Activity </td>
                    <th>Action </td>
                </tr>
            </thead>
            <tbody>

                <?php // print_r($customers) ?>
                <?php foreach ($customers as $customer) { ?>
                    <tr name="<?= $customer['id']?>">
                        <td><?= $customer['title'] ?> </td>
                        <td><a class="underline" href="javascript:void(0);" onClick="showCustomer(<?= $customer['id']?>)"><?= $customer['customer_name'] ?> </a></td>
                        <td>
                            <?php
                            $i = 0;
                            foreach ($customer['CustomerActivity'] as $activity) {
                                if ($i != 0)
                                    echo ", ";
                                echo $activity['Activity']['activity_name'];
                                $i = 1;
                            }
                            ?>
                        </td>
                        <td align="center"> 
                            <a original-title="Show" href="javascript:void(0)" onClick="showCustomerbrief(<?= $customer['id']?>)" class="tipS"><?= image_tag('icons/color/information.png') ?></a>
                            &nbsp;&nbsp;
                            <a original-title="Edit" href="javascript:void(0)" onClick="editCustomer(<?= $customer['id']?>)" class="tipS"><?= image_tag('icons/color/pencil.png') ?></a>
                            &nbsp;&nbsp;
                            <a original-title="Remove" href="javascript:void(0)" onClick="deleteCustomer(<?= $customer['id']?>)" class="tipS"><?= image_tag('icons/color/cross.png') ?></a>
                        </td>
                    </tr>    
<?php } ?>
            </tbody>
            <tfoot></tfoot>
        </table>
    </div>
</fieldset>
